// [[ OnflowGenerator File UUID: d94859b46c514c428ad7a15aa51fb6fb  ]]
package com.itdct.onflow.system.task.qo

import com.itdct.onflow.core.qo.BaseQo
import com.itdct.onflow.core.type.Add
import com.itdct.onflow.core.type.Update
import io.swagger.v3.oas.annotations.media.Schema
import jakarta.validation.constraints.NotBlank
import jakarta.validation.constraints.NotNull
import org.hibernate.validator.constraints.Length
import java.util.*

/**
 * @author DCTANT
 * @date 2025-09-19 16:39:00
 * @version 1.0
 * @description 定时任务编辑入参
 */
@Schema(name = "定时任务编辑入参", description = "定时任务编辑入参")
class SysTaskEditQo : BaseQo() {
    // [[ OnflowGenerator Range (- fields -) Start ]]
    @Schema(title = "任务名", example = "")
    @NotBlank(message = "请输入任务名", groups = [Add::class, Update::class])
    @Length(max = 50, message = "任务名不能超过50个字符", groups = [Add::class, Update::class])
    var name: String? = null

    @Schema(title = "任务执行类", example = "")
    @NotBlank(message = "请输入任务执行类", groups = [Add::class, Update::class])
    @Length(max = 100, message = "任务执行类不能超过100个字符", groups = [Add::class, Update::class])
    var taskClass: String? = null

    @Schema(title = "额外参数", example = "")
    @Length(max = 1000, message = "额外参数不能超过1000个字符", groups = [Add::class, Update::class])
    var extraArg: String? = null

    @Schema(title = "循环类型", example = "")
    @NotNull(message = "请输入循环类型", groups = [Add::class, Update::class])
    var cycleType: Int? = null

    @Schema(title = "执行状态", example = "")
    @NotNull(message = "请输入执行状态", groups = [Add::class, Update::class])
    var executeState: Int? = null

    @Schema(title = "cron表达式", example = "")
    @Length(max = 64, message = "cron表达式不能超过64个字符", groups = [Add::class, Update::class])
    var cron: String? = null

    @Schema(title = "指定执行时间", example = "")
    @Length(max = 64, message = "指定执行时间不能超过64个字符", groups = [Add::class, Update::class])
    var specifyTime: String? = null

    @Schema(title = "间隔时间", example = "")
    var intervalTime: Long? = null

    @Schema(title = "首次开始时间", example = "")
    var firstTime: Date? = null

    @Schema(title = "首次延迟时间", example = "")
    var firstDelayTime: Long? = null

    @Schema(title = "是否启用", example = "")
    @NotNull(message = "请输入是否启用", groups = [Add::class, Update::class])
    var enable: Boolean? = null

    @Schema(title = "上次开始时间", example = "")
    var lastStartTime: Date? = null

    @Schema(title = "上次结束时间", example = "")
    var lastEndTime: Date? = null

    @Schema(title = "执行次数", example = "")
    var executeTimes: Int? = null

    @Schema(title = "平台类型", example = "")
    @NotBlank(message = "请输入平台类型", groups = [Add::class, Update::class])
    @Length(max = 100, message = "平台类型不能超过100个字符", groups = [Add::class, Update::class])
    var platformType: String? = null

    @Schema(title = "备注", example = "")
    @Length(max = 500, message = "备注不能超过500个字符", groups = [Add::class, Update::class])
    var remark: String? = null

// [[ OnflowGenerator Range (- fields -) End ]]
}